package com.jili.singleton;

import com.sun.xml.internal.ws.developer.MemberSubmissionAddressing;

/**
 * ClassName: HungrySingleton
 * Package com.jili.singleton
 * Description:
 *
 * @Author: 廖继礼
 * @Create: 2024/7/28
 * @Version: v1.0
 */
public class HungrySingleton {

    private static volatile HungrySingleton hungrySingleton;

    private HungrySingleton() {

    }

    public static HungrySingleton getInstance() {
        if (hungrySingleton == null) {
            synchronized (HungrySingleton.class) {
                if (hungrySingleton == null) {
                    hungrySingleton = new HungrySingleton();
                }
            }
        }
        return hungrySingleton;
    }
}
